home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / networking / terms / kermit / b / ik0com.asm < prev    next >
Encoding:
Assembly Source File  |  1992-09-29  |  84.1 KB  |  1,064 lines

  1. *COPY                                                 IK0COM            01800000
  2.          CHECKVER IK0COM,4.2                                   @SC90072 01800500
  3.          TITLE 'COMMON - Kermit-370 common routines/data areas'         01801000
  4. COMMON   CSECT                                                          01802000
  5. * Translat - translates data.  On entry R2->buffer, R3=length  @SC86202 01803000
  6. *   R14 = return address, R15->translate table                 @SC86202 01804000
  7. *   R1-R3 are destroyed, R15 is set to 0                       @SC86202 01805000
  8. TRANSLAT LTR   3,3           Anything to do?                   @SC86202 01806000
  9.          BNP   TRANSRET      No, quit                          @SC86202 01807000
  10.          ALR   2,3           End of source                     @SC86202 01808000
  11. TRLOOP   LR    1,2                                             @SC86202 01809000
  12.          SR    1,3           Ptr to remaining bytes            @SC86202 01810000
  13.          BCTR  3,0           Count for EX                      @SC86202 01811000
  14.          EX    3,TREX        Translate the input segment       @SC86202 01812000
  15.          N     3,=F'-256'    Remove count done                 @SC86202 01813000
  16.          BNZ   TRLOOP        Loop thru source                  @SC86202 01814000
  17. TRANSRET SR    15,15         Done, set RC=0                    @SC86202 01815000
  18.          BR    14                                              @SC86202 01816000
  19. TREX     TR    0(,1),0(15)                                     @SC86202 01817000
  20. *                                                                       01818000
  21. * Subroutine to test for undelimited v-binary format           @SC86151 01819000
  22. RDWSET   XC    RDWLEN,RDWLEN Usual format                      @SC86151 01820000
  23.          LA    0,5           Header length of 5 for D-binary   @SC86262 01821000
  24.          CLI   TYPFIL,C'D'   Is it?                            @SC86262 01822000
  25.          BE    RDWSOK        Yes, use it                       @SC86262 01823000
  26.          LA    0,2           Header length of 2 for V-binary   @SC86262 01824000
  27.          CLI   TYPFIL,C'V'   Test for special type             @SC86151 01825000
  28.          BNER  14            Not V-binary                      @SC86151 01826000
  29. RDWSOK   DS    0H                                              @SC86262 01827000
  30.          ST    0,MAXOUT      Init for decoding                 @SC86151 01828000
  31.          ST    0,RDWLEN                                        @SC86151 01829000
  32.          BR    14                                              @SC86151 01830000
  33. *                                                                       01831000
  34. * Subroutine to increment pkt sequence number                           01832000
  35. INCRSEQ  IC    3,SEQ                                           @SC86135 01833000
  36.          LA    3,1(3)                                                   01834000
  37.          N     3,MOD64                                                  01835000
  38.          STC   3,SEQ                                           @SC86135 01836000
  39.          LA    3,1                                             @SC86295 01837000
  40.          AL    3,PAKCNT                                        @SC86295 01838000
  41.          ST    3,PAKCNT      Update packet count               @SC86295 01839000
  42.          BR    14                                                       01840000
  43. *                                                                       01841000
  44. * Subroutines to interpret RPACK data                                   01842000
  45. INPUTSPK SR    3,3           Clear counter                     @SC86276 01843000
  46.          KCALL SPACK,E=INPUTRTY                                @SC86276 01844000
  47. INPUT    SR    3,3                   Clear loop counter                 01845000
  48. INPUTLUP KCALL RPACK         Read data                                  01846000
  49. INPUTINR DS    0H                                              @SC88074 01847000
  50.          IC    4,RTYPE       Test byte                         @SC86158 01848000
  51.          TM    FL3,ZPRO                                        @SC88074 01848200
  52.          BO    INPUTQRT      Must stop pronto                  @SC88074 01848400
  53.          MVI   ERRNUM,ERRIPT Assume bad packet type            @SC88074 01848600
  54.          BAL   2,CLKP        Look up in list                   @SC86158 01849000
  55. * Standard packet types for special treatment                  @SC86158 01850000
  56. INPUTST  DC    AL1(AE),AL3(INPUTERR) Error packet              @SC86158 01851000
  57.          DC    AL1(AN),AL3(INPUTNAK) NAK packet                @SC86158 01852000
  58.          DC    AL1(AQ),AL3(INPUTQAB) RPACK error               @SC86158 01853000
  59.          DC    AL1(AT),AL3(INPUTTIM) Time out                  @SC86355 01854000
  60.          DC    AL1(00),AL3(INPUTCNT) OK so far                 @SC86158 01855000
  61. *                                                                       01856000
  62. INPUTCNT DS    0H                                              @SC86158 01857000
  63.          CLC   SEQ,RSN                                                  01858000
  64.          BNE   INPUTMIS              Go if pkt num mismatch             01859000
  65. INPUTQRT LR    2,8                   Get next-state table address       01860000
  66.          LR    14,9          For in-line return                @SC86295 01861000
  67.          B     CLKP          Look up in expected list          @SC86158 01862000
  68. *                                                                       01863000
  69. INPUTMIS MVI   ERRNUM,ERRMIS Missing pkt                       @SC86156 01864000
  70.          B     INPUTRTY              Retry                              01865000
  71. *                                                                       01866000
  72. INPUTQAB MVC   ERRNUM,RPKERN RPACK error: get code             @SC89219 01867000
  73.          CLI   STYPE,AB                                        @SC88168 01867500
  74.          BNE   INPUTRTY              Retry if not a BRK pkt             01868000
  75. INPUTACK MVI   RTYPE,AY      Fake an ACK                       @SC88092 01869000
  76.          IC    4,RTYPE                                         @SC86158 01870000
  77.          B     INPUTQRT              And go handle the ACK              01871000
  78. *                                                                       01872000
  79. INPUTTIM MVI   ERRNUM,ERRTIM Timed out                         @SC86355 01873000
  80.          B     INPUTRTY                                        @SC86355 01874000
  81. INPUTNAK MVI   ERRNUM,ERRNAK Micro NAK'ed                      @SC86156 01875000
  82.          IC    2,SEQ         Expected packet number            @SC88092 01875100
  83.          LA    2,1(2)                                          @SC88092 01875200
  84.          N     2,MOD64       Get next number                   @SC88092 01875300
  85.          CLM   2,1,RSN       Is that what we got?              @SC88092 01875400
  86.          BE    INPUTACK      Yes, treat as an ACK              @SC88092 01875500
  87. INPUTRTY BAL   2,SENDRTY     Resend to the limit               @SC86276 01876000
  88.          B     INPUTLUP              And interpret response             01877000
  89. *                                                                       01878000
  90. INPUTERR CLI   STYPE,AI      Trying to send I packet?          @SC89263 01879000
  91.          BE    IPKSKP        Ok, other Kermit too stupid       @SC89263 01879300
  92.          MVI   ERRNUM,ERRABO Micro aborted                     @SC89263 01879600
  93.          LR    2,9           Save return                       @SC86295 01880000
  94.          BAL   9,DECODEN     Decode error message              @SC86295 01881000
  95.          LR    9,2                                             @SC86295 01882000
  96.          L     0,WBUF        Ptr to decoded message            @BS86090 01883000
  97.          L     1,WBUFL                                         @BS86090 01884000
  98.          L     14,EMSGP      Ptr to msg buffer                 @BS86090 01885000
  99.          LA    15,LEMSG                                        @BS86090 01886000
  100.          CR    1,15                                            @BS86090 01887000
  101.          BNH   *+6                                             @BS86090 01888000
  102.          LR    1,15          Truncate msg                      @BS86090 01889000
  103.          ST    1,EMSGL       Save effective length             @BS86090 01890000
  104.          MVCL  14,0          Save in buffer                    @BS86090 01891000
  105.          L     1,EMSGP                                         @BS86090 01892000
  106.          TR    0(LEMSG,1),ATOED Convert to EBCDIC              @SC89301 01893000
  107. INPUTABR SR    4,4           Look for end of table             @SC86158 01894000
  108.          B     INPUTQRT                                        @SC86158 01895000
  109. *                                                                       01896000
  110. * CLKP - Subroutine to dispatch to routine from table lookup   @SC86158 01897000
  111. *  R2->table, R4=char, R14->return if null entry in table      @SC86158 01898000
  112. *  Each entry has AL1(char),AL3(adr), last char=00             @SC86158 01899000
  113. CLKNXT   LA    2,4(2)        Next state                        @SC86158 01900000
  114. CLKP     CLM   4,1,0(2)      Match?                            @SC86158 01901000
  115.          BE    CLKF          Yes, go do it                     @SC86158 01902000
  116.          CLI   0(2),0                                                   01903000
  117.          BNE   CLKNXT        Not at the end yet                @SC86158 01904000
  118. CLKF     ICM   2,7,1(2)      Pick routine address              @SC86158 01905000
  119.          BNZR  2             Go to that routine if any         @SC86295 01906000
  120.          BR    14            Or fall down to caller            @SC86158 01907000
  121. *                                                                       01908000
  122. * Retry sending same packet until success or abort             @SC86276 01909000
  123. SENDRTY  LA    3,1(3)        Increment retry counter           @SC86276 01910000
  124.          CL    3,LIMTRY      Did we retry enough?              @SC86276 01911000
  125.          BNL   INPUTABR      Yes, abort if limit reached       @SC86276 01912000
  126.          LA    15,1                                            @SC86276 01913000
  127.          AL    15,RTRCNT                                       @SC86276 01914000
  128.          ST    15,RTRCNT     Update retry count                @SC86276 01915000
  129.          TM    FL5,NAK0                                        @SC90037 01916000
  130.          BO    SENDNAK       Haven't sent anything yet         @SC86276 01917000
  131.          KCALL SIO,E=SENDRTY Resend the same packet            @SC86276 01918000
  132.          BR    2             Success, return                   @SC86276 01919000
  133. *                                                                       01920000
  134. * Subroutine to send a NAK                                              01921000
  135. SENDNAK  MVI   STYPE,AN              A NAK pkt                          01922000
  136.          XC    DATL,DATL             no data                            01923000
  137.          B     SENDPK        Send the packet                   @SC86276 01924000
  138. *                                                                       01925000
  139. * Subroutine to send an ACK                                             01926000
  140. SENDACK  XC    DATL,DATL             no data length                     01927000
  141. SENDACKL MVI   STYPE,AY              an ACK pkt                         01928000
  142.          SR    3,3           Clear counter                     @SC86276 01929000
  143. SENDPK   KCALL SPACK,E=SENDRTY Send the packet                 @SC86276 01930000
  144.          BR    2                     return                             01931000
  145. *                                                                       01932000
  146. * Set up command to foreign server. Trade parms if necessary            01933000
  147. IPKSET   KCALL INTINI,4,E=INPUTABR Initialize for sending      @SC87300 01934000
  148.          TM    FL3,PXCH                                        @SC86155 01935000
  149.          BO    IPKFIN                                          @SC86155 01936000
  150.          MVI   SEQ,0                                           @SC86155 01937000
  151.          MVC   LIMTRY,MAXTNT Limit for INIT retries            @SC86345 01938000
  152.          KCALL RPARSET                                         @SC86155 01939000
  153.          KCALL RPAR          Our I packet to send              @SC86155 01940000
  154.          ICM   8,8,STYPE     Save packet type                  @SC86295 01941000
  155.          MVI   STYPE,AI      Packet type = initialize          @SC86155 01942000
  156.          BAL   9,INPUTSPK    Send RPAR and interpret response  @SC86295 01943000
  157.          STCM  8,8,STYPE     Restore packet type               @SC86295 01944000
  158.          KCALL SPAR          Interpret reply to our I packet   @SC86155 01945000
  159. IPKFIN   MVI   SEQ,0         Reset packet number               @SC86155 01946000
  160.          MVC   LIMTRY,MAXTRY Nominal retry limit               @SC86295 01947000
  161.          B     12(8)         Skip over 3-entry table           @SC88074 01948000
  162. IPKSKP   XC    DATL,DATL     Pretend we got an empty ACK       @SC89263 01948300
  163.          BR    9             ... and resume above              @SC89263 01948600
  164. *                                                                       01949000
  165. * Subroutine to skip over white-space                                   01950000
  166. WSP      LM    6,7,LEN               Length and address of input        01951000
  167.          LTR   6,6                   Any more data left to scan?        01952000
  168.          BNPR  9             Nope, fail                        @SC86135 01953000
  169. WSPLUP   CLI   0(7),C' '                                       @SC86115 01954000
  170.          BE    WSPNXT                Skip a blank                       01955000
  171.          CLI   0(7),NL                                                  01956000
  172.          BNE   WSPEND                Skip a new-line char               01957000
  173. WSPNXT   LA    7,1(7)                next char                          01958000
  174.          BCT   6,WSPLUP              decrement length                   01959000
  175.          BR    9                                                        01960000
  176. *                                                                       01961000
  177. WSPEND   STM   6,7,LEN               Save new non-white spot            01962000
  178.          B     4(9)                  Skip return                        01963000
  179. *                                                                       01964000
  180. * Subroutine to get next token from commands                            01965000
  181. TOK      LM    6,7,LEN               Length and address of input        01966000
  182.          LTR   6,6                   Any more data to tokenize?         01967000
  183.          BNPR  9             No, error return                  @SC86135 01968000
  184.          MVI   BRK,C' '      Init break char                   @SC88306 01968500
  185. *                                                                       01969000
  186. TOKLUP   CLI   0(7),C' '                                       @SC86115 01970000
  187.          BE    TOKSKP                Found a blank terminator           01971000
  188.          CLI   0(7),NL                                                  01972000
  189.          BE    TOKSKP                Found a new-line terminator        01973000
  190.          CLI   0(7),C','                                       @SC86115 01974000
  191.          BNE   TOKNXT                Not a comma                        01975000
  192.          C     7,ADR                 Is comma the first char?           01976000
  193.          BNE   TOKSKP                No, must be a token itself         01977000
  194. TOKNXT   LA    7,1(7)                Next char                          01978000
  195.          BCT   6,TOKLUP              decrement remaining length         01979000
  196. TOKSKP   BCTR  6,0                   remaining length of input          01980000
  197.          ST    6,LEN                 Save it for next time              01981000
  198.          LTR   6,6           Did we run off the end?           @SC88306 01981200
  199.          BM    *+10          Yes, nothing left                 @SC88306 01981400
  200.           MVC  BRK,0(7)      No, keep the break char for ref.  @SC88306 01981600
  201.          LA    6,1(7)        Next spot to scan                 @SC86224 01982000
  202.          S     7,ADR                 Length of token                    01983000
  203.          ST    6,ADR         Next spot to scan                 @SC86224 01984000
  204.          SR    6,7                                             @SC86224 01985000
  205.          BCTR  6,0           Address of token                  @SC86224 01986000
  206.          BCTR  7,0                   Token length - 1                   01987000
  207.          B     4(9)                  Skip return                        01988000
  208. *                                                                       01989000
  209. * Subroutine to skip white-space and pick next token                    01990000
  210. WSPTOK   BAL   9,WSP                                                    01991000
  211.           B    0(14)         Ran off the end                   @SC86135 01992000
  212.          BAL   9,TOK                                                    01993000
  213.           B    0(14)         No more tokens                    @SC86135 01994000
  214.          B     4(14)                 Skip return                        01995000
  215. *                                                                       01996000
  216. * Interpret decimal number from string at (R6) of length=(R7)           01997000
  217. *   Clobber R4,R7,R15.  Return value in R0 and skips if ok.             01998000
  218. *   If R15 changed, it points to first non-numeric character            01999000
  219. GETNUM   LTR   4,7           Copy length                       @SC86316 01999200
  220.          BNPR  14            Nothing, skip it                  @SC89218 01999400
  221.          C     4,F           Length must be <16                @SC87012 02000000
  222.          BHR   14                                              @SC87012 02001000
  223.          BCTR  7,0           Change for EX                     @SC86316 02002000
  224.          LR    15,6          Don't lose pointer to input       @SC86316 02003000
  225. GETNUML  CLI   0(15),C'0'                                      @SC86316 02004000
  226.          BLR   14            Go if not numeric                 @SC86316 02005000
  227.          CLI   0(15),C'9'                                      @SC86316 02006000
  228.          BHR   14            Go if not numeric                 @SC86316 02007000
  229.          LA    15,1(15)      Bump input pointer                @SC86316 02008000
  230.          BCT   4,GETNUML     Go if more                        @SC86316 02009000
  231.          EX    7,GETNUMPK    Pack the input                    @SC86316 02010000
  232.          CVB   0,TMPDW       Convert to binary                 @SC86316 02011000
  233.          B     4(14)         Return and skip                   @SC86316 02012000
  234. GETNUMPK PACK  TMPDW,0(,6)                                     @SC86316 02013000
  235. *                                                                       02014000
  236. * Test for Ascii char range of 33-62 and 96-126, skip on return if ok   02015000
  237. *  Character must be in low byte of R4                                  02016000
  238. CHKQR    CLM   4,1,SPACE+3                                     @SC86120 02017000
  239.          BNHR  14            Cannot use control char or blank  @SC86120 02018000
  240.          CLM   4,1,MOD64+3                                     @SC86120 02019000
  241.          BL    4(14)         OK, 33-62                         @SC86120 02020000
  242.          CLM   4,1,LOCASE+96                                   @SC86295 02021000
  243.          BLR   14                                              @SC86120 02022000
  244.          CLM   4,1,LOCASE+127                                  @SC86295 02023000
  245.          BNLR  14                                              @SC86120 02024000
  246.          B     4(14)         OK, 96-126                        @SC86120 02025000
  247. *                                                                       02026000
  248. * Subroutine to scan a parse table built by KW macro                    02027000
  249. SCAN     CLI   0(6),C'?'                                       @SC86115 02028000
  250.          BE    HELPKW                                                   02029000
  251.          MVC   OPRND,0(6)    Copy token for lookup             @SC87034 02030000
  252.          TR    OPRND,UPCASE  And convert to upper case         @SC87034 02031000
  253.          SR    15,15                                                    02032000
  254. SCANLUP  CLI   0(1),254                                        @SC88168 02033000
  255.          BH    4(14)         Return to caller if end           @SC88168 02034000
  256.          BL    *+12          Not a branch to new list          @SC88168 02035000
  257.           ICM  1,7,1(1)      Yes, get ptr to new list          @SC88168 02036000
  258.           B    SCANLUP       And resume search                 @SC87117 02037000
  259.          CLM   7,1,4(1)      Compare token length vs min abbr           02039000
  260.          BL    SCANNO                Go if < min                        02040000
  261.          CLM   7,1,0(1)      Compare token and kw lengths      @SC88168 02041000
  262.          BH    SCANNO                Go if length of token > kw's       02042000
  263.          EX    7,SCANCLC                                                02043000
  264.          BE    SCANYES                                                  02044000
  265. SCANNO   IC    15,0(1)       KW length - 1                     @SC88168 02045000
  266.          LA    1,6(15,1)             add 3+1+1+1 to it                  02046000
  267.          B     SCANLUP       Continue checking                          02047000
  268. *                                                                       02048000
  269. SCANYES  CLM   7,8,F0        Flagged just to find entry?       @SC86355 02049000
  270.          BNER  14            Yes, got it                       @SC86355 02050000
  271.          TR    0(1,6),UPCASE Upcase 1st letter, just in case   @SC87034 02051000
  272.          ICM   14,7,1(1)     No, get handler address           @SC88168 02052000
  273.          BR    14                                                       02053000
  274. *                                                                       02054000
  275. SCANCLC  CLC   5(,1),OPRND   Compare token to KW               @SC87034 02055000
  276. *                                                                       02056000
  277. * Utility routine to set up linkage                                     02057000
  278. SUBENT   LR    KSUBBASE,15   CSECT addressibility              @SC89268 02058000
  279.          L     15,STKPTR     Current end of stack              @SC86295 02059000
  280.          AR    0,15          Our needs                         @SC86295 02060000
  281.          C     0,STKLIM      Does it fit?                      @SC86295 02061000
  282.          BH    SUBDIE        No, (that's incredible)           @SC86295 02062000
  283.          ST    0,STKPTR      New end                           @SC86295 02063000
  284.          CL    0,STKHI                                         @SC89089 02063200
  285.          BNH   *+8                                             @SC89089 02063400
  286.           ST   0,STKHI       New high limit of stack usage     @SC89089 02063600
  287.          ST    13,4(15)      Link subroutines                  @SC86295 02064000
  288.          ST    15,8(13)                                        @SC86295 02065000
  289.          LR    13,15                                           @SC86295 02066000
  290.          LR    1,0           End of local variables            @SC87012 02067000
  291.          LA    0,72(15)      Start=end of save area            @SC87012 02068000
  292.          SR    1,0                                             @SC87012 02069000
  293.          BNP   *+8           No locals                         @SC87012 02070000
  294.          SR    15,15                                           @SC87012 02071000
  295.          MVCL  0,14          Zero-fill all locals              @SC87012 02072000
  296.          L     15,4(13)                                        @SC87012 02073000
  297.          LM    0,1,20(15)    Restore R0,R1                     @SC87012 02074000
  298.          BR    14            Go                                @SC86295 02075000
  299. SUBDIE   LM    14,12,12(13)                                    @SC86295 02076000
  300.          LA    15,1                                            @SC87012 02077000
  301.          LCR   15,15         Set return code = -1              @SC87012 02078000
  302.          BR    14            Go                                @SC86295 02079000
  303. *                                                                       02080000
  304. * Common exit code                                                      02081000
  305. RETSNRC  MVI   BCTU,1        Reset chksum at end of transfer   @SC86295 02082000
  306.          ST    0,KAFUNC      Save for KACCT call               @AB89191 02082500
  307.          KCALL INTINI,0      Close line for transfer           @SC86295 02083000
  308.          KCALL SUPFNC,10     Get time                          @SC86295 02084000
  309.          S     15,SECTOT     Take elapsed time                 @SC86295 02085000
  310.          BNM   *+8           Ok, no wrap                       @SC86345 02086000
  311.          A     15,=F'1759218604'  Wraps by 2**44/10000         @SC86345 02087000
  312.          ST    15,CSECTOT    Save elapsed time in csec         @SC86345 02088000
  313.          SR    14,14                                           @SC86295 02089000
  314.          LA    0,100                                           @SC86295 02090000
  315.          DR    14,0          Convert to sec                    @SC86295 02091000
  316.          AR    14,14         Check remainder                   @SC86295 02092000
  317.          CR    14,0                                            @SC86295 02093000
  318.          BL    *+8                                             @SC86295 02094000
  319.          A     15,F1         Round up                          @SC86295 02095000
  320.          ST    15,SECTOT                                       @SC86295 02096000
  321.          ICM   15,15,KAEXIT  R15 -> stats exit routine         @AB89191 02096100
  322.          BZ    RTRN0         0 ==> no exit supplied            @AB89191 02096200
  323.          L     0,KAFUNC      R0 = SEND/RECEIVE indicator       @AB89191 02096300
  324.          LA    1,NSENTAC     R1 -> file transfer statistics    @AB89191 02096400
  325.          LA    2,TRMLIN      R2 -> current LINE definition     @AB89191 02096500
  326.          BALR  14,15         Call accounting exit              @AB89191 02096600
  327.          B     RTRN0                                           @SC86295 02097000
  328.          WXTRN KACCT                                           @AB89191 02097200
  329. KAEXIT   DC    AL4(KACCT)    Accounting exit (if supplied)     @AB89191 02097400
  330. RTRNUM   BAL   14,LDERR      Fetch error code                  @SC87117 02098000
  331.          B     RTRN                                            @SC87117 02099000
  332. RTRN2    LA    15,2          Indicate error                    @SC86295 02100000
  333.          B     RTRN                                            @SC86295 02101000
  334. RTRNM1   SR    15,15         Error = -1                        @SC86295 02102000
  335.          BCTR  15,0                                            @SC86295 02103000
  336.          B     RTRN                                            @SC86295 02104000
  337. RTRN0    SR    15,15         No errors                         @SC86295 02105000
  338.          B     RTRN                                            @SC86295 02106000
  339. SUBERR   WTEXT (3),(4)       Print prepared message            @SC86295 02107000
  340. RTRN1    LA    15,1          Indicate error                    @SC86295 02108000
  341. RTRN     ST    13,STKPTR     Free the storage                  @SC86295 02109000
  342.          L     13,4(13)      Unlink                            @SC86295 02110000
  343.          L     14,12(13)     Restore registers                 @SC86295 02111000
  344.          LM    0,12,20(13)                                     @SC86295 02112000
  345.          LTR   15,15         Test return code                  @SC86295 02113000
  346.          BR    14                                              @SC86295 02114000
  347. *                                                                       02115000
  348. * Subroutine to fetch error code (but 0 if no transfers yet)            02116000
  349. LDERR    SR    15,15                                                    02117000
  350.          CLI   ERRNUM,ERRNFT No file transfer isn't an error   @HF86157 02118000
  351.          BER   14                                              @HF86157 02119000
  352.          IC    15,ERRNUM     Return status code                @HF86157 02120000
  353.          BR    14                                              @HF86157 02121000
  354. *                                                                       02122000
  355. * Subroutine to decode without disk-write                               02123000
  356. DECODEN  NI    FL1,255-EOF           No EOF yet                         02124000
  357.          XC    WBUFL,WBUFL           No data in WBUF yet                02125000
  358.          OI    FL1,NAME              No disk-writes                     02126000
  359.          KCALL DECODE        Decode data into WBUF             @SC86135 02127000
  360.          NI    FL1,255-NAME          Turn this off                      02128000
  361.          BR    9                                               @SC86295 02129000
  362. *                                                                       02130000
  363. * Subroutine to encode without disk-read                                02131000
  364. ENCODEN  XC    RBUFP,RBUFP           Start encoding at beg of RBUF      02132000
  365.          OI    FL1,NAME              Indicate not to do disk reads      02133000
  366.          KCALL ENCODE        Encode it into DATA               @SC86135 02134000
  367.          NI    FL1,255-NAME          Turn this off                      02135000
  368.          LTR   15,15         Did it work?                      @SC89072 02135300
  369.          BP    INPUTABR      No, something awful happened      @SC89072 02135600
  370.          BR    9                                               @SC86295 02136000
  371. *                                                                       02137000
  372. * Subroutine to display the contents of the KW tables                   02138000
  373. HELPKW   SR    7,7                   token length holder                02139000
  374.          LA    2,16          Tab width for display             @SC86295 02140000
  375.          LA    3,CMD+79      Display buffer limit offset       @SC86295 02141000
  376.          LR    4,1                   KW table address                   02142000
  377.          WTEXT 'One of the following:'                                  02143000
  378. HELPNL   LA    1,CMD+1       Display buffer offset             @SC86295 02144000
  379.          MVI   CMD,C' '      Start blanking it                 @SC86115 02145000
  380.          MVC   CMD+1(79),CMD         blank 80 chars                     02146000
  381. HELPNT   CLI   0(4),254                                        @SC88168 02147000
  382.          BH    HELPEND       Return if end of tokens           @SC88168 02148000
  383.          BL    *+12          Not branch to other list          @SC88168 02149000
  384.           ICM  4,7,1(4)      Yes, get ptr to new list          @SC88168 02150000
  385.           B    HELPNT        And resume scan                   @SC87117 02151000
  386.          IC    7,0(4)        Length-1 of current token         @SC88168 02152000
  387.          IC    15,4(4)               min abbreviation length - 1        02154000
  388.          EX    7,HELPMVC             move it to display buffer          02155000
  389.          LA    4,6(4,7)              skip to next token in KW table     02156000
  390.          MVI   15(1),C' '    Move a blank separator            @SC86115 02157000
  391.          TR    0(15,1),LOCASE Make everthing lower case        @SC86295 02158000
  392.          EX    15,TRUPCAS    Upper case the minimum            @SC86295 02159000
  393.          BXLE  1,2,HELPNT    Loop if more room on line         @SC86295 02160000
  394.          WTEXT CMD,80                display one line of tokens         02161000
  395.          B     HELPNL                and continue with next line        02162000
  396. *                                                                       02163000
  397. HELPEND  LA    0,CMD+1                                         @SC86295 02164000
  398.          CR    6,0           Is there anything accumulated?    @SC86295 02165000
  399.          BER   14            No, display buffer empty          @SC86135 02166000
  400.          WTEXT CMD,80                                                   02167000
  401. BR14     BR    14                                                       02168000
  402. *                                                                       02169000
  403. HELPMVC  MVC   0(,1),5(4)    Copy KW                           @SC86295 02170000
  404. *                                                                       02171000
  405. * Subroutine to compress a file specification                  @HF86223 02172000
  406. PAKFIL   LA    1,PREFIX      Start with prefix                 @HF86223 02173000
  407.          L     7,RBUF        Put FN here for encode            @SC86155 02174000
  408.          BAL   14,PAKFOR                                       @SC86295 02175000
  409.          LA    0,FFENC                                         @SC86295 02176000
  410.          KCALL FSPEC,FILNAM  Copy name with possible override  @SC86295 02177000
  411.          LR    7,15          New output ptr                    @SC86295 02178000
  412.          LA    1,SUFFIX      Finish with suffix                @SC86224 02179000
  413.          BAL   14,PAKFOR                                       @SC86295 02180000
  414.          S     7,RBUF        Length of buffer                  @SC86155 02181000
  415.          ST    7,RBUFL                                         @SC86155 02182000
  416.          BR    9                                               @HF86223 02183000
  417. *                                                                       02184000
  418. * Subroutine to append characters to the filespec              @HF86223 02185000
  419. PAKFOR   SR    2,2           Number of characters to append    @HF86223 02186000
  420.          ICM   2,1,0(1)      Probably none                     @HF86223 02187000
  421.          BZR   14                                              @SC86295 02188000
  422.          BCTR  2,0           Copy into buffer                  @HF86223 02189000
  423.          EX    2,PAKRMV                                        @HF86223 02190000
  424.          EX    2,PAKRTR      And ASCII it                      @HF86223 02191000
  425.          LA    7,1(2,7)      New end of string                 @HF86223 02192000
  426.          BR    14                                              @SC86295 02193000
  427. *                                                                       02194000
  428. PAKRMV   MVC   0(0,7),1(1)                                     @HF86223 02195000
  429. PAKRTR   TR    0(0,7),ETOAD                                    @SC89301 02196000
  430. *                                                                       02197000
  431. * Routines to add decimal and string arguments to a buffer     @SC86209 02198000
  432. * Input: R15->insert point, R4=dec. value, R2->return          @SC86209 02199000
  433. EDDEC    CVD   4,TMPDW       Get packed decimal                @SC86209 02200000
  434.          MVC   0(10,15),=X'40202020202020202120'               @SC86209 02201000
  435.          LA    9,10(15)      End of possible string            @SC86209 02202000
  436.          LA    1,9(15)       Last possible start of signif.    @SC86209 02203000
  437.          EDMK  0(10,15),TMPDW+3                                @SC86209 02204000
  438.          LTR   4,4           Check sign                        @SC86209 02205000
  439.          BNM   EDDPOS                                          @SC86209 02206000
  440.          BCTR  1,0           Back up and insert minus          @SC86209 02207000
  441.          MVI   0(1),C'-'                                       @SC86209 02208000
  442. EDDPOS   LR    8,1           Start                             @SC86209 02209000
  443.          SR    9,8           Length                            @SC86209 02210000
  444. *   R8->argument string, R9=length                             @SC86209 02211000
  445. EDCHAR   EX    9,EDCHRMV     Copy string to buffer (1 extra)   @HF86223 02212000
  446.          AR    15,9          Update output ptr                 @SC86209 02213000
  447.          BR    2                                               @SC86295 02214000
  448. EDCHRMV  MVC   0(0,15),0(8)  Copy string to buffer             @HF86223 02215000
  449. *                                                                       02216000
  450. * Enter here with R7->position in CMD, R1->filespec. Return to (R2).    02217000
  451. STAFSP   LA    0,FFDSP                                         @SC86295 02218000
  452.          KCALL FSPEC         Copy name for display             @SC86295 02219000
  453. STAPM15  LR    0,15          Output ptr                        @BS86090 02220000
  454. STAPMSG  LA    1,CMD         Start of string                   @SC86295 02221000
  455.          SR    0,1           Get length                        @SC86295 02222000
  456.          WTEXT (1),(0)                                         @SC86295 02223000
  457.          BR    2                                               @SC86295 02224000
  458. *                                                                       02225000
  459. TRUPCAS  TR    0(,1),UPCASE  Upcase                            @SC86158 02227000
  460. *                                                                       02228000
  461. * Main command loop implementation of TAKE files                        02271000
  462.          USING SERVERSV,13   Uses locals of caller, e.g. SERVER@SC86295 02272000
  463. LOOPS    STM   0,1,RETADR    Initialize for main loop          @SC86295 02273000
  464.          BR    14                                              @SC86295 02274000
  465. *                                                                       02275000
  466. LUPERK   BCT   15,LUPBAD     Go if bad operand: try on system  @SC86171 02276000
  467.          MVI   ERRNUM,ERRKCE Kermit command error                       02277000
  468.          OI    FL5,CMERR     Note error                        @SC86295 02278000
  469.          B     LOOP                                            @SC86295 02279000
  470. LOOP0    CLI   ERRNUM,ERRKCE Stale error?                      @SC86295 02280000
  471.          BNE   LOOP          No, keep old error code           @SC86295 02281000
  472.          MVI   ERRNUM,ERRNOE Clear old error condition         @SC86295 02282000
  473.          B     LOOP                                            @SC86295 02283000
  474. LUPFNF   MVI   ERRNUM,ERRFNF File not found                    @SC86295 02284000
  475.          B     LUPWRTE                                         @SC86239 02285000
  476. LUPINV   MVI   ERRNUM,ERRKCE Invalid command                   @SC86239 02286000
  477. LUPWRTE  OI    FL5,CMERR     Note error                        @SC86171 02287000
  478. LUPWRT   WTEXT (3),(4)                                         @SC86355 02288000
  479. *                                                                       02289000
  480. LOOP     MVC   OLDERR,ERRNUM                                   @SC86171 02290000
  481.          ICM   2,15,TAKLEV   Get current TAKE level            @SC86295 02291000
  482.          BZ    LUPEX                                           @SC86295 02292000
  483.          BCTR  2,0                                             @SC86295 02293000
  484.          SLA   2,2           Get offset into table             @SC86295 02294000
  485.          LA    2,TAKTAB(2)   Point into TAKE file table        @SC86295 02295000
  486.          TM    FL5,CMERR+TKHLT                                 @SC86239 02296000
  487.          BO    LUPREX        Quit reading on error             @SC86239 02297000
  488.          NI    FL5,255-CMERR-TKMSG Clear error flag            @SC86239 02298000
  489.          READF 0(2),NONUM,E=LUPRER                             @SC88101 02299000
  490.          LA    1,CMD         Ptr to buffer, R0 = length        @SC86171 02300000
  491.          LR    3,1                                             @SC88006 02300100
  492.          AR    3,0           Get end of buffer                 @SC88006 02300200
  493.          BCTR  3,0                                             @SC88006 02300300
  494.          CLI   0(3),C' '     Find last non-blank               @SC88006 02300400
  495.          BE    *-6                                             @SC88006 02300500
  496.          LA    0,1(3)        One past end of buffer            @SC88006 02300600
  497.          SR    0,1           Get trimmed length                @SC88006 02300700
  498.          BNP   LOOP          Nothing there, ignore it          @SC88006 02300800
  499.          B     LUPPRS        Go parse                                   02301000
  500. *                                                                       02302000
  501. LUPRER   C     15,F12        EOF code?                                  02303000
  502.          BE    LUPCLO        Yes, close the file                        02304000
  503.          ERRF  ,             Analyze the error                 @SC87338 02305000
  504. LUPREX   OI    FL5,CMERR     Note error                        @SC86171 02306000
  505.          TM    FL5,TKMSG     Already issued message?           @SC86239 02307000
  506.          BO    LUPCLO        Don't overdo it                   @SC86239 02308000
  507.          WTEXT 'Error reading TAKE file'                       @SC86239 02309000
  508.          OI    FL5,TKMSG                                       @SC86239 02310000
  509. LUPCLO   CLOSF (2)           Close the file                    @SC86135 02311000
  510.          L     2,TAKLEV      Get TAKE level                             02312000
  511.          BCTR  2,0           And decrement it                           02313000
  512.          ST    2,TAKLEV                                                 02314000
  513.          B     LOOP                                                     02315000
  514. *                                                                       02316000
  515. LUPEX    NI    FL5,255-CMERR-TKMSG Clear error flag            @SC86239 02317000
  516.          L     14,RETADR                                       @SC86295 02318000
  517.          BR    14                                                       02319000
  518. *                                                                       02320000
  519. LUPKRM   TM    FL5,KRMONLY   Already seen KERMIT prefix?       @SC90059 02320200
  520.          BO    LUPBAD        Yes, let's not clown around       @SC90059 02320400
  521.          OI    FL5,KRMONLY   Override SYSCMD option for now    @SC90059 02320600
  522.          B     LUPTOK                                          @SC90059 02320800
  523. LUPPRS   DS    0H                                              @SC87034 02321000
  524.          STM   0,1,SCANPTR   Save for parser                   @SC86171 02322000
  525.          NI    FL5,255-KRMONLY Allow possibility of host cmd   @SC90059 02322500
  526.          LTR   2,2                                             @SC86171 02323000
  527.          BZ    LUPTOK        Not from TAKE                     @SC86171 02324000
  528.          TM    FL2,ECHO                                        @SC86171 02325000
  529.          BNO   LUPTOK        Not echoing                       @SC86171 02326000
  530.          WTEXT (1),(0)       Echo to terminal                  @SC86171 02327000
  531. LUPTOK   MVC   SCANSV,SCANPTR Save for system                  @SC86295 02328000
  532.          NTOKN N=LOOP                                                   02329000
  533.          CLI   0(6),C'*'                                       @SC86115 02330000
  534.          BE    LOOP          Go if comment                              02331000
  535.          L     1,CMDPTR                                        @SC86295 02332000
  536.          SCAN  (1),LOOP                                        @SC86295 02333000
  537. LUPBAD   PTEXT 'Invalid Kermit command'                                 02334000
  538.          TM    FL2,PASS                                        @SC86295 02335000
  539.          BZ    LUPINV        Don't try as system cmd           @SC86295 02336000
  540.          TM    FL5,KRMONLY   KERMIT prefix?                    @SC90059 02336300
  541.          BO    LUPINV        Yes, don't try as system cmd      @SC90059 02336600
  542.          MVC   SCANPTR,SCANSV Restore string ptrs              @SC86295 02337000
  543.          OI    FL4,UCMD                                        @SC86295 02338000
  544.          KCALL SUPFNC,3,E=(LOOP,NM) And execute it             @SC86295 02339000
  545.          B     LUPINV                                          @SC86295 02340000
  546. *                                                                       02341000
  547. LUPSET   KCALL SET,E=LUPERK  Call SET routine                  @SC86295 02342000
  548.          B     LOOP0                                           @SC86295 02343000
  549. *                                                                       02344000
  550. LUPSHO   KCALL SHOW,E=LUPERK Call SHOW routine                 @SC86295 02345000
  551.          B     LOOP0                                           @SC86295 02346000
  552. *                                                                       02347000
  553. LUPCWD   KCALL CWDSET,E=LUPERK                                 @SC86295 02348000
  554.          B     LOOP0                                           @SC86295 02349000
  555. *                                                                       02350000
  556. LUPGIV   KCALL GIVTAB,E=LUPERK                                 @SC87117 02351000
  557.          B     LOOP0                                           @SC87117 02352000
  558. *                                                                       02353000
  559. LUPTAK   BAL   9,LUPTINS     Look for file                     @SC86295 02354000
  560.            B   LUPFNF        Not found                         @SC86295 02355000
  561.          MVI   ERRNUM,ERRNOE No error                          @SC86295 02356000
  562.          B     LOOP          OK                                @SC86295 02357000
  563. *                                                                       02358000
  564. LUPTIN   STM   1,2,SCANPTR   Set up scan                       @SC86295 02359000
  565. LUPTINS  SR    0,0           Flags for TAKE parsing            @SC86295 02360000
  566.          KCALL FSPEC,FILNAM  Get filespec                      @SC86295 02361000
  567.          BAL   14,LUPCKFN                                      @SC86295 02362000
  568.          LR    3,9           Save return                       @SC86295 02363000
  569.          BAL   14,LUPCNF     Check for illegal extras          @SC86295 02364000
  570.          LR    9,3                                             @SC86295 02365000
  571.          PTEXT 'Past maximum nesting level for TAKE command'            02366000
  572.          L     5,TAKLEV      Current TAKE level                @SC86295 02367000
  573.          LA    14,TAKMAX                                       @SC86295 02368000
  574.          CR    5,14                                            @SC86295 02369000
  575.          BNL   LUPINV                                          @SC86239 02370000
  576.          SLA   5,2           Offset into table                 @SC86295 02371000
  577.          LA    5,TAKTAB(5)   Point into table of TAKE files    @SC86295 02372000
  578.          PTEXT 'File not found' In case of error                        02373000
  579.          MVI   ERRNUM,ERRFNF In case of error                  @SC86171 02374000
  580.          OPENF I,FILNAM,TAKFDB,0(5),E=0(9)                     @SC86295 02375000
  581.          PTEXT 'TAKE file loop'                                @SC86239 02376000
  582.          USING FDBD,1                                          @SC86295 02377000
  583.          TM    FDBFLGS,FDBACTV Check for file active already   @SC86295 02378000
  584.          DROP  1                                               @HF86232 02379000
  585.          BZ    LUPTIOK                                         @SC86295 02380000
  586.          CLOSF (5)                                             @SC86295 02381000
  587.          BR    9                                               @SC86295 02382000
  588. LUPTIOK  L     3,TAKLEV      Get current take level                     02383000
  589.          LA    3,1(3)        And increment                              02384000
  590.          ST    3,TAKLEV                                                 02385000
  591.          B     4(9)                                            @SC86295 02386000
  592. *                                                                       02387000
  593. LUPCKFN  LTR   15,15                                           @SC86295 02388000
  594.          BZR   14            No problem, R15=0                 @SC86295 02389000
  595.          BCT   15,LUPINV     Error, R15>1                      @SC86295 02390000
  596.          B     LUPWRTE       Help requested, R15=1             @SC86295 02391000
  597. *                                                                       02392000
  598. LUPSTA   BAL   14,LUPCNF     Check for illegal extras          @SC86295 02393000
  599.          MVC   ERRNUM,OLDERR Restore from last command         @SC86158 02394000
  600.          KCALL STATUS        Write error message               @SC86156 02395000
  601.          B     LOOP0                                           @SC86295 02396000
  602. *                                                                       02397000
  603. LUPSPA   KCALL DSPACE                                          @SC86164 02398000
  604.          B     LOOP0                                           @SC86295 02399000
  605. *                                                                       02400000
  606. LUPDMP   KCALL DUMP,E=LUPERK Dump translation table            @SC86156 02401000
  607.          B     LOOP0                                           @SC86295 02402000
  608. *                                                                       02403000
  609. LUPHSTI  DS    0H                                              @SC86295 02404000
  610.          AIF   ('&TYPCMD' EQ 'TYPE').TYPOK                     @SC86295 02405000
  611.          MVC   0(,6),=CL16'&TYPCMD' Use right name             @SC86295 02406000
  612.          EX    7,*-6                                           @SC86295 02407000
  613. .TYPOK   A     7,LEN         Add remaining to token length              02408000
  614.          LA    5,2(7)        Plus one for separator            @SC86171 02409000
  615.          STM   5,6,SCANPTR   Reset for tokenizer               @SC86171 02410000
  616. LUPHST   PTEXT 'Specify a &KSYS command to issue'              @SC86295 02411000
  617.          FTOKN H=LUPWRTE,N=LUPINV Point to command             @SC86239 02412000
  618.          LA    1,3           Execute host command              @SC86316 02413000
  619. LUPSYS   OI    FL4,UCMD      User command, check for EXEC's    @SC86316 02414000
  620.          PTEXT 'Illegal system command'                        @SC86295 02415000
  621.          KCALL SUPFNC,E=(LUPWRTE,M) Execute it                 @SC86295 02416000
  622.          B     LOOP                                                     02417000
  623.          AIF   ('&KSYS' NE 'CMS').CM1Z                         @SC86355 02418000
  624. *                                                                       02419000
  625. LUPCP    PTEXT 'Specify a CP command to issue'                          02420000
  626.          FTOKN N=LUPINV,H=LUPWRTE                              @SC86295 02421000
  627.          LR    0,7                                             @SC86295 02422000
  628.          LA    1,4                                             @SC86295 02423000
  629.          B     LUPSYS                                          @SC86295 02424000
  630. .CM1Z    ANOP                                                           02425000
  631. *                                                                       02426000
  632. LUPCNF   FTOKN N=0(14),H=LUPCRH                                @SC86295 02427000
  633.          PTEXT 'Extra operand'                                 @SC86295 02428000
  634.          B     LUPINV                                          @SC86295 02429000
  635. LUPCRH   PTEXT 'No operands needed'                            @SC86295 02430000
  636.          B     LUPWRTE                                         @SC86295 02431000
  637.          DROP  13                                                       02432000
  638. XONCHAR  DC    AL1(XON)                                        @SC86121 02433000
  639. GRDATA   DC    X'&S1CMD',X'70'                                 @SC87215 02434000
  640. GRDL     EQU   *-GRDATA                                        @SC87215 02435000
  641. XLFCT    DC    A(KMAXF)      Extended packet size base         @SC86202 02436000
  642. AKMIN    DC    A(KMIN)       Packet min size                   @SC86295 02437000
  643. AMAXWT   DC    A(MAXWT)      Longest terminal write            @SC86295 02438000
  644. AMAXRT   DC    A(MAXRT)      Longest terminal read             @SC86295 02439000
  645. F64KP    DC    A(((&MAXLR+7+5+4)/8)*8) Size of disk buffers    @SC87351 02440000
  646. F0       DC    F'0'                                                     02441000
  647. F1       DC    F'1'                                                     02442000
  648. F2       DC    F'2'                                                     02443000
  649. F3       DC    F'3'                                            @SC86295 02444000
  650. F4       DC    F'4'                                            @SC86295 02445000
  651. F5       DC    F'5'                                                     02446000
  652. F8       DC    F'8'                                                     02447000
  653. F12      DC    F'12'                                                    02448000
  654. F64      DC    F'64'                                                    02449000
  655. BLANK    EQU   F64+3         EBCDIC blank                      @SC86295 02450000
  656. F        DC    F'15'                                                    02451000
  657. MOD64    DC    F'63'                                                    02452000
  658. F256     DC    F'256'                                                   02453000
  659. FLFID1   DC    A(LFID+5)     Length of items in filespec table @SC88092 02453500
  660. SPACE    DC    A(ABL)                ASCII SPACE                        02454000
  661. LOBIT    DC    X'0000007F'                                              02462000
  662. * Parameter defaults.  Must map directly into DEFPARM etc.              02463000
  663.          KSYSTF ,                                              @SC86295 02464000
  664.          DS    0F --------Init for LOG file                    @SC86295 02465000
  665.          DC    A(0)          Buffer ptr                        @SC86295 02466000
  666.          DC    A(LPKT)       Buffer length                     @SC86295 02467000
  667.          FDBPAT ,V,LPKT      Default disk RECFM, etc.          @SC88120 02468000
  668.          DS    0F --------Init for SEND/RECEIVE file           @SC86295 02471000
  669.          DC    A(0)          Addr of FSWRITE buffer            @SC86295 02472000
  670.          DC    F'&MAXLR'     Buffer length                     @SC89215 02473000
  671.          FDBPAT ,V,80        Default disk RECFM, etc.          @SC88120 02474000
  672.          DS    0F --------Init for TAKE file (read-only)       @SC86295 02477000
  673.          DC    A(0)          Buffer ptr (CMD)                  @SC86295 02478000
  674.          DC    F'256'        Max buffer size                   @SC86295 02479000
  675.          FDBPAT ,V           Default disk RECFM (no LRECL)     @SC88120 02480000
  676. *                                                                       02481000
  677. IMAXTNT  DC    F'16'         Retry limit during setup          @SC86345 02482000
  678. IMAXTRY  DC    F'5'          Retry limit during transfer       @SC86164 02483000
  679. ILCLDLY  DC    F'10'         Time to wait before sending       @SC86164 02484000
  680. IBAUD    DC    F'1200'       Assumed baud rate                 @SC88325 02484500
  681. IRPSIZ   DC    A(KMAX)       Max receive size                  @SC86295 02485000
  682. ISPSIZ   DC    A(KDEF)       Max send size                     @SC86295 02487000
  683. IMAXOUT  DC    F'&MAXLR'     Max output buffer                 @SC86268 02488000
  684. * Send mode Rpack interpret input table                        @SC89263 02488100
  685. ISNDST   DC    AL1(AY),AL3(0)        Micro ACK'd               @SC89263 02488200
  686.          DC    XL1'FF',AL3(SNDABR)   Stop                      @SC89263 02488300
  687.          DC    AL1(AN),AL3(INPUTMIS) Repeated trigger packet   @SC89263 02488400
  688.          DC    AL1(00),AL3(SNDABR)   Error routine             @SC89263 02488500
  689. ITRMLIN  DC    CL8' '        Current data line                 @SC87166 02489000
  690. IATFLG   DC    3X'FF'        Attribute-honoring flags          @SC90037 02489500
  691. ITYPFIL  DC    C'T'          Type of file (T,B,V,D),see BINF   @SC86151 02490000
  692. ICLSNFL  DC    C'O'          Collision default is OVERWRITE    @SC90033 02490200
  693. ITRNCFL  DC    C'T'          Truncate by default (vs. F or H)  @SC88120 02490500
  694. IDEFPRM  DC    AL1(KDEF+ABL,ABL,ABL,64,CR+ABL,A#,AN,A1,ABL,ABL) SC86149 02491000
  695.          DC    AL1(ABL,ABL,ABL,ABL)  Extended size defaults    @TB86196 02492000
  696.          DC    X'0'          Capabilities of micro      RCAPA  @SC86295 02493000
  697.          DC    X'8'          Capabilities I have        SCAPA  @SC86295 02494000
  698. LONGP    EQU   X'02'         LONGP bit in CAPAS flags          @TB86196 02495000
  699. MORCAPAS EQU   X'01'         More CAPAS bytes exist            @TB86196 02496000
  700.          DC    AL1(CR)       EOL char I need (cr)       REOL   @SC86295 02497000
  701.          DC    AL1(CR)       EOL I'll send              SEOL   @SC86295 02498000
  702.          DC    AL1(SOH)      Incoming pkt start char    RMARK  @SC86295 02499000
  703.          DC    AL1(SOH)      Outbound pkt start char    SMARK  @SC86295 02500000
  704.          DC    AL1(A#)       Micro's ctl-quote char     RCTLQ  @SC86295 02501000
  705.          DC    AL1(A#)       Ctl-quote char we'll use   SCTLQ  @SC86295 02502000
  706.          DC    AL1(AAMP)     Orig 8-bit quote char      EBQC   @SC86295 02503000
  707.          DC    AL1(5)        Time limit - micro to wait RTIMO  @SC86295 02504000
  708.          DC    AL1(0)        Timeout, if we can do it   TIMOUT @SC86295 02505000
  709.          DC    AL1(120)      Timeout, if we can do it   TIMOSRV@SC90045 02505100
  710.          DC    AL1(0)        Recieve parity is MARK     RPRTY  @SC88288 02505300
  711.          DC    AL1(DAT8)     Send parity is NONE        SPRTY  @SC88288 02505600
  712.          DC    AL1(1)        User requested chk type    BCTC   @SC86295 02506000
  713.          DC    AL1(ATIL)     Original repeat prefix     RPTQC  @SC86295 02507000
  714.          DC    A(0,S1ORDL+2) For sending prompt         S1XOPL @SC87274 02508000
  715.          DC    X'&S1CMD',AL1(SBA),X'5D7F',AL1(SBA),X'0005' ON  @SC87274 02509000
  716.          DC    AL1(CR)       In case micro lost one     S1EOL  @SC87274 02510000
  717.          DC    AL1(XON)      Handshake for micro        S1HND  @SC87274 02511000
  718. COMMON   CSECT               Resume addressible constants      @SC89215 02511200
  719. MAXLRC   DC    F'&MAXLR'     Max lrecl                         @SC89215 02511400
  720. AKMAX    DC    A(KMAX)       Normal packet maximum             @SC89215 02511600
  721. MAXBSZ   DC    F'&MAXBS'     Max blksiz                        @SC86268 02512000
  722. BUFSIZ   DC    Y(LPKT)       Length of packet buffers          @SC86190 02513000
  723. *                                                                       02514000
  724. * Constants for COMMON                                                  02515000
  725.          LTORG                                                          02516000
  726. * Translation for conversion to hex notation                   @SC86156 02517000
  727. TRHEX    EQU   *-240                                           @SC86156 02518000
  728.          DC    C'0123456789ABCDEF'                             @SC86156 02519000
  729. * ASCII to EBCDIC translate table                                       02520000
  730. ATOED    HTBL  00,01,02,03,37,2D,2E,2F,16,05,25,0B,0C,0D,0E,0F 0 C89268 02521000
  731.          HTBL  10,11,12,13,3C,3D,32,26,18,19,3F,27,1C,1D,1E,1F 1 C89268 02522000
  732.          HTBL  40,5A,7F,7B,5B,6C,50,7D,4D,5D,5C,4E,6B,60,4B,61 2 C89268 02523000
  733.          HTBL  F0,F1,F2,F3,F4,F5,F6,F7,F8,F9,7A,5E,4C,7E,6E,6F 3 C89268 02524000
  734.          HTBL  7C,C1,C2,C3,C4,C5,C6,C7,C8,C9,D1,D2,D3,D4,D5,D6 4 C89268 02525000
  735.          HTBL  D7,D8,D9,E2,E3,E4,E5,E6,E7,E8,E9,AD,E0,BD,5F,6D 5 C89268 02526000
  736.          HTBL  79,81,82,83,84,85,86,87,88,89,91,92,93,94,95,96 6 C89268 02527000
  737.          HTBL  97,98,99,A2,A3,A4,A5,A6,A7,A8,A9,C0,4F,D0,A1,07 7 C89268 02528000
  738.          HTBL  00,01,02,03,37,2D,2E,2F,16,05,25,0B,0C,0D,0E,0F 8 C89268 02529000
  739.          HTBL  10,11,12,13,3C,3D,32,26,18,19,3F,27,1C,1D,1E,1F 9 C89268 02530000
  740.          HTBL  40,5A,7F,7B,5B,6C,50,7D,4D,5D,5C,4E,6B,60,4B,61 A C89268 02531000
  741.          HTBL  F0,F1,F2,F3,F4,F5,F6,F7,F8,F9,7A,5E,4C,7E,6E,6F B C89268 02532000
  742.          HTBL  7C,C1,C2,C3,C4,C5,C6,C7,C8,C9,D1,D2,D3,D4,D5,D6 C C89268 02533000
  743.          HTBL  D7,D8,D9,E2,E3,E4,E5,E6,E7,E8,E9,AD,E0,BD,5F,6D D C89268 02534000
  744.          HTBL  79,81,82,83,84,85,86,87,88,89,91,92,93,94,95,96 E C89268 02535000
  745.          HTBL  97,98,99,A2,A3,A4,A5,A6,A7,A8,A9,C0,4F,D0,A1,07 F C89268 02536000
  746. * EBCDIC to ASCII translate table                                       02537000
  747. ETOAD    HTBL  00,01,02,03,00,09,00,7F,00,00,00,0B,0C,0D,0E,0F 0 C89268 02538000
  748.          HTBL  10,11,12,13,00,00,08,00,18,19,00,00,1C,1D,1E,1F 1 C89268 02539000
  749.          HTBL  00,00,00,00,00,0A,17,1B,00,00,00,00,00,05,06,07 2 C89268 02540000
  750.          HTBL  00,00,16,00,00,00,00,04,00,00,00,00,14,15,00,1A 3 C89268 02541000
  751.          HTBL  20,00,00,00,00,00,00,00,00,00,5C,2E,3C,28,2B,7C 4 C89268 02542000
  752.          HTBL  26,00,00,00,00,00,00,00,00,00,21,24,2A,29,3B,5E 5 C89268 02543000
  753.          HTBL  2D,2F,00,00,00,00,00,00,00,00,7C,2C,25,5F,3E,3F 6 C89268 02544000
  754.          HTBL  00,00,00,00,00,00,00,00,00,60,3A,23,40,27,3D,22 7 C89268 02545000
  755.          HTBL  00,61,62,63,64,65,66,67,68,69,00,7B,00,00,00,00 8 C89268 02546000
  756.          HTBL  00,6A,6B,6C,6D,6E,6F,70,71,72,00,7D,00,00,00,00 9 C89268 02547000
  757.          HTBL  00,7E,73,74,75,76,77,78,79,7A,00,00,00,5B,00,00 A C89268 02548000
  758.          HTBL  00,00,00,00,00,00,00,00,00,00,00,00,00,5D,00,00 B C89268 02549000
  759.          HTBL  7B,41,42,43,44,45,46,47,48,49,00,00,00,00,00,00 C C89268 02550000
  760.          HTBL  7D,4A,4B,4C,4D,4E,4F,50,51,52,00,00,00,00,00,00 D C89268 02551000
  761.          HTBL  5C,00,53,54,55,56,57,58,59,5A,00,00,00,00,00,00 E C89268 02552000
  762.          HTBL  30,31,32,33,34,35,36,37,38,39,7C,00,00,00,00,00 F C89268 02553000
  763. * Table to remove 8th bit (overlaps LOCASE following)          @SC87253 02554000
  764. OFF80    DC    128AL1(*-OFF80)                                 @SC87253 02555000
  765. * Table to convert EBCDIC text to lower case                            02556000
  766. LOCASE   DC    192AL1(*-LOCASE)                                @SC86209 02557000
  767.          HTBL  C0,81,82,83,84,85,86,87,88,89,CA,CB,CC,CD,CE,CF @SC89268 02558000
  768.          HTBL  D0,91,92,93,94,95,96,97,98,99,DA,DB,DC,DD,DE,DF @SC89268 02559000
  769.          HTBL  E0,E1,A2,A3,A4,A5,A6,A7,A8,A9,EA,EB,EC,ED,EE,EF @SC89268 02560000
  770.          DC    016AL1(*-LOCASE)                                @SC86209 02561000
  771. * Table to convert EBCDIC text to upper case                   @SC89215 02561100
  772. UPCASE   DC    128AL1(*-UPCASE)                                @SC89215 02561200
  773.          HTBL  80,C1,C2,C3,C4,C5,C6,C7,C8,C9,8A,8B,8C,8D,8E,8F @SC89268 02561300
  774.          HTBL  90,D1,D2,D3,D4,D5,D6,D7,D8,D9,9A,9B,9C,9D,9E,9F @SC89268 02561400
  775.          HTBL  A0,A1,E2,E3,E4,E5,E6,E7,E8,E9,AA,AB,AC,AD,AE,AF @SC89268 02561500
  776.          DC    080AL1(*-UPCASE)                                @SC89215 02561600
  777.          TITLE 'Variable storage for Kermit-370'                        02562000
  778. &STORDS  DSECT ,                                               @SC89268 02563000
  779. STORAG   EQU   *                                               @SC89268 02563500
  780. * - - - Translate tables (user-settable or program-modified)            02564000
  781. TRTBL    DS    CL256         For finding blanks                @SC86295 02565000
  782. ATOE     DS    CL256         For converting to EBCDIC          @SC86295 02566000
  783. ETOA     DS    CL256         For converting to ASCII           @SC86295 02567000
  784. TATOE    DS    CL256         For converting packets to EBCDIC  @SC87117 02568000
  785. TETOA    DS    CL256         For retrieving input ASCII        @SC87117 02569000
  786. * - - - Variables initialized to zeroes                                 02572000
  787. SCANPTR  DS    0D            Len and address of parse buffer            02573000
  788. LEN      DS    F                                                        02574000
  789. ADR      DS    F                                                        02575000
  790. SCANSV   DS    D             Saved len and adr                 @SC86295 02576000
  791. CMD      DS    CL256         Buffer                            @SC86121 02577000
  792. CBUF     DS    A             Address of CP response buffer     @SC86121 02578000
  793. MSNDBUF  DS    A             Adr of filespec buffer            @SC88306 02578300
  794. MSNDPTR  DS    A             Scan ptr for readout              @SC88306 02578600
  795. DATL     DS    F             Send packet size                  @SC86121 02579000
  796. KBYTES   DS    F             Size of current file              @SC86158 02581000
  797. FDATE    DS    XL7           Date/time of current file         @SC88235 02581500
  798. * Program flags                                                @SC86316 02582000
  799. FL1      DS    X                                               @SC86316 02583000
  800. TSTF     EQU   X'80'         Special option for debugging      @SC86295 02584000
  801. ROVR     EQU   X'40'         Overwrite sent filename                    02585000
  802. REN      EQU   X'20'         Rename incoming file                       02586000
  803. KEEP     EQU   X'10'         Keep incomplete files             @SC90037 02587000
  804. NAME     EQU   X'08'         Encoding/decoding a name                   02588000
  805. BINF     EQU   X'04'         Binary data                                02589000
  806. EOF      EQU   X'02'         End-of-file                                02590000
  807. DEBUG    EQU   X'01'         Debug mode ON                              02591000
  808. FL2      DS    X                                               @SC86316 02592000
  809. FOPTS    EQU   X'80'         Found file options                @SC89218 02592500
  810. TABS     EQU   X'40'         Expand tabs                                02593000
  811. EOFZ     EQU   X'20'         Truncate at ^Z for EOF                     02594000
  812. SRV      EQU   X'10'         In SERVER mode                             02595000
  813. PASS     EQU   X'08'         Try 'illegal' cmds on system      @SC86295 02596000
  814. ECHO     EQU   X'04'         Echo TAKE files                   @SC86171 02597000
  815. PROTO    EQU   X'02'         Line ready for transfers          @SC86295 02598000
  816. DAT8     EQU   X'01'         8-bit data line                   @SC86316 02599000
  817. *--- DAT8 is now used only in RPRTY/SPRTY                      @SC88288 02599500
  818. FL3      DS    X                                               @SC86316 02600000
  819. ZPRO     EQU   X'80'         Stop protocol mode pronto         @SC88074 02600500
  820. SVATT    EQU   X'40'         Preserve attributes of old files  @SC90033 02600700
  821. PXCH     EQU   X'20'         Parameters exchanged              @SC86152 02601000
  822. APPN     EQU   X'10'         Append to existing files          @SC86203 02602000
  823. FL4      DS    X                                               @SC86316 02603000
  824. TTAB     EQU   X'80'         Use separate tables for terminal  @SC87117 02604000
  825. SFM      EQU   X'20'         Sending from memory               @SC86158 02605000
  826. TXT      EQU   X'10'         Xmitting text to micro            @SC86158 02606000
  827. NPS      EQU   X'08'         Xmitting without protocol         @SC86165 02607000
  828. NMCHNG   EQU   X'04'         Filename collsion occurring       @SC90033 02607500
  829. UCMD     EQU   X'02'         User command entered              @SC86158 02608000
  830. NMOK     EQU   X'01'         Filename collsion already checked @SC87012 02609000
  831. FL5      DS    X                                               @SC86316 02610000
  832. CMERR    EQU   X'80'         Syntax error on last command      @SC86171 02611000
  833. TKHLT    EQU   X'40'         Quit TAKE file on error           @SC86171 02612000
  834. NAK0     EQU   X'10'         Send NAK during Resend            @SC90037 02614000
  835. SALL     EQU   X'08'         Search all disks for SEND         @SC86209 02615000
  836. TKMSG    EQU   X'04'         Already issued TAKE error msg     @SC86239 02616000
  837. KRMONLY  EQU   X'02'         Saw KERMIT prefix on subcmd       @SC90059 02616500
  838. *                                                                       02617000
  839. RPKERN   DS    X             Tentative error code from RPACK   @SC89219 02617500
  840. SEQ      DS    X             Current pkt number                @SC86135 02618000
  841. RSN      DS    X             Received pkt number               @SC86135 02619000
  842. BRK      DS    C             Break char for last parsed word   @SC88306 02619500
  843. TRMFLG   DS    X             Flag(s) for terminal I/O          @SC87275 02620000
  844. TRMTP    DS    C             Type of terminal line             @SC87166 02621000
  845. DBGFLG   DS    X             Type of debug log                 @SC88168 02621100
  846. DBGON    EQU   X'80'         Logging on                        @SC88168 02621200
  847. DBGIO    EQU   X'40'         Logging of I/O info (SERIES1)     @SC88168 02621300
  848. DBGRW    EQU   X'20'         Logging raw packets, not EBCDIC   @SC88168 02621400
  849. DBGSV    EQU   X'10'         Log file closed after each entry  @SC88168 02621500
  850. RBUF     DS    A             Addr of FSREAD buffer             @SC86121 02622000
  851. CLEN     DS    A             Length of non-tokenized parm      @SC86121 02623000
  852. NSENT    DS    F             Number of files sent              @SC86121 02624000
  853. TSENT    DS    F             Pointer to sent files table       @SC86121 02625000
  854. IOERC    DS    F             Error count to detect loops       @SC86158 02626000
  855. TXTPTR   DS    3F            Ptrs to start and end of text     @SC89268 02627000
  856. RBUFL    DS    F             Record len (if recfm = V)         @SC86121 02628000
  857. RDWLEN   DS    F             Record descriptor length          @SC86151 02629000
  858. SNDPKL   DS    F             SNDPKT length for I/O             @SC86295 02630000
  859. RCVPKL   DS    F             RCVPKT length after I/O           @SC86295 02631000
  860. APKT     DS    A             Ptr to packet buffer              @SC86190 02632000
  861. ASPKT    DS    A             Ptr to effective send packet      @SC86190 02633000
  862. AASPKT   DS    A             Ptr to send packet                @SC86190 02634000
  863. ASDATA   DS    A             Ptr to data to send               @SC86190 02635000
  864. ARPKT    DS    A             Ptr to receive packet buffer      @SC86190 02636000
  865. ARDATA   DS    A             Ptr to received data              @SC86190 02637000
  866. FILPTR   DS    A             Ticket for FILNAM file I/O        @SC86295 02638000
  867. LOGPTR   DS    A             Ticket for LOG file I/O           @SC86295 02639000
  868. KAFUNC   DS    F             SEND/RECEIVE indicator            @AB89191 02639500
  869. NSENTAC  DS    F             Number of files sent              @AB89191 02640000
  870. TOUTOT   DS    2F            I*8 count of bytes sent           @SC86295 02641000
  871. TINTOT   DS    2F            I*8 count of bytes received       @SC86295 02642000
  872. DSKTOT   DS    2F            I*8 count of disk I/O bytes       @SC86295 02643000
  873. SSVDSK   DS    2F            Saved disk byte count             @SC88092 02643500
  874. PAKCNT   DS    F             Number of packets sent/received   @SC86295 02644000
  875. RTRCNT   DS    F             Number of retries                 @SC86295 02645000
  876. SECTOT   DS    F             Duration of transfer (sec)        @SC86295 02646000
  877. CSECTOT  DS    F             Duration of transfer (csec)       @SC86345 02647000
  878. RECTRC   DS    F             Count of record truncations       @SC87268 02648000
  879. RECFLD   DS    F             Count of record foldings          @SC88120 02648200
  880. EMSGL    DS    F             Length of msg                     @BS86090 02648500
  881. TINSV    DS    12F           3 snapshots of progress           @SC88325 02648700
  882. *--------- NSENT to here is known to Accounting routine        @SC90080 02648800
  883. LSTATS   EQU   *-TOUTOT      Size of area to initialize        @SC86295 02649000
  884. PREFIX   DS    X,CL(FORMAXL) Prefix count and buffer           @HF86223 02650000
  885. SUFFIX   DS    X,CL(FORMAXL) Suffix count and buffer           @HF86223 02651000
  886. FILNAM   DS    CL(LFID)      SEND/REC filename                 @SC86295 02654000
  887. FLNOPTS  DS    2AL4          File options                      @SC89218 02654300
  888. LFOPTS   EQU   *-FLNOPTS     Length of options                 @SC89218 02654600
  889.          DS    0F                                              @SC86295 02655000
  890. IFILE    DS    CL(LFID)      Name of file(s) to send           @SC86295 02656000
  891. IFOPTS   DS    2AL4          File options                      @SC89218 02656200
  892. JFSPEC   DS    X             Length of foreign filespec        @SC86224 02656400
  893. JFNAM    DS    CL95          Filespec                          @SC86224 02656600
  894. LFSTF    EQU   *-IFILE       Length of file info               @SC89218 02656800
  895. XFILE    DS    CL(LFID)      Intended name of received file    @SC90033 02656900
  896. LIMTRY   DS    F             Max packet retries                         02657000
  897. FREEDW   DS    F             Size of aux. storage              @SC86295 02658000
  898. FREEPTR  DS    A             Ptr to aux. storage               @SC87286 02659000
  899. STKLO    DS    A             Start of stack space              @SC89089 02659300
  900. STKHI    DS    A             High extent of stack usage        @SC89089 02659600
  901. STKPTR   DS    F             Current stack end                 @SC86295 02660000
  902. STKLIM   DS    F             End of stack storage              @SC86295 02661000
  903. EVCTR    DS    F             Count of files opened             @SC86295 02662000
  904. EMSGP    DS    A             Ptr to micro message              @BS86090 02663000
  905. LEMSG    EQU   80            Max msg length kept               @SC87338 02665000
  906. LMARG    DS    F             Left margin for SEND (0=>none)    @SC87253 02666000
  907. RMARG    DS    F             Right margin (0=>none)            @SC87253 02667000
  908. RBUFP    DS    F             RBUF pointer                               02668000
  909. WBUFL    DS    F             Data length in WBUF                        02669000
  910. MAXSIZ   DS    2A(KDEF-16)   Max pkt size sent                          02670000
  911. ORGR0    DS    F             Saved R0 at main entry            @SC87253 02671000
  912. ORGR1    DS    F             Saved R1 at main entry            @SC86295 02672000
  913. *  Plists for reading and writing in protocol mode                      02673000
  914. S1WRPL   DS    2F            Address, length of data to send   @SC86295 02674000
  915. S1RDPL   DS    A(0,LPKT+3)   For reading data (max length)     @SC86295 02675000
  916. *                                                                       02676000
  917. TYWRPL   DS    2F            Address, length of data to send   @SC86295 02677000
  918. TYRDPL   DS    A(0,LPKT)     For reading data (max length)     @SC86295 02678000
  919. *                                                                       02679000
  920. CDESPTR  DS    A(0)                                            @SC90040 02679300
  921. TRNALF   DS    C'ASCII   '                                     @SC90040 02679600
  922. FILALF   DS    C'EBCDIC  '                                     @SC90040 02679900
  923. RIOC     DS    F             Saved data length from prev read  @SC86295 02680000
  924. PREV     DS    C             Previous char decoded                      02681000
  925. * - - - Variables initialized via block MVC's                           02682000
  926.          KSYSTF ,                                              @SC86295 02683000
  927. * Specifications for LOG file                                  @SC86295 02684000
  928. LOGFDB   DS    0F                                              @SC86295 02685000
  929. LOGBUF   DS    A             Buffer ptr                        @SC86295 02686000
  930.          DS    A(LPKT)       Buffer size                       @SC86295 02687000
  931.          FDBPAT LOG,V,LPKT   Default disk RECFM, etc.          @SC88120 02689000
  932. * Specifications for SEND/RECEIVE file                         @SC86295 02692000
  933. FILFDB   DS    0F                                              @SC86295 02693000
  934. WBUF     DS    A,F           Adr,length of FSWRITE buffer      @SC86121 02694000
  935.          FDBPAT FIL,V,80     Default disk RECFM, etc.          @SC88120 02696000
  936. * Specifications for TAKE file (read-only)                     @SC86295 02699000
  937. TAKFDB   DS    0F                                              @SC86295 02700000
  938. TAKBUF   DS    A             Buffer ptr (CMD)                  @SC86295 02701000
  939.          DS    F'256'        Max buffer size                   @SC86295 02702000
  940.          FDBPAT TAK,V        Default disk RECFM (no LRECL)     @SC88120 02703000
  941. *                                                                       02705000
  942. MAXTNT   DS    F'16'         Retry limit during setup          @SC86345 02706000
  943. MAXTRY   DS    F'5'          Retry limit during transfer       @SC86164 02707000
  944. LCLDLY   DS    F'10'         Time to wait before sending       @SC86164 02708000
  945. BAUD     DS    F'1200'       Assumed baud rate                 @SC88325 02708500
  946. RPSIZ    DS    A(KMAX)       Max receive size                  @SC86295 02709000
  947. SPSIZ    DS    A(KDEF)       Max send size                     @SC86295 02710000
  948. MAXOUT   DS    F'&MAXLR'     Max output buffer                 @SC86268 02711000
  949. * Send mode Rpack interpret input table                        @SC89263 02711100
  950. SNDST    DS    AL1(AY),AL3(0)        Micro ACK'd               @SC89263 02711200
  951.          DS    XL1'FF',AL3(SNDABR)   Stop                      @SC89263 02711300
  952. RTYPPRV  DS    AL1(AN),AL3(INPUTMIS) Repeated trigger packet   @SC89263 02711400
  953.          DS    AL1(00),AL3(SNDABR)   Error routine             @SC89263 02711500
  954. TRMLIN   DS    CL8' '        Current data line                 @SC87166 02712000
  955. ATFLG    DS    X             Attribute-honoring flags          @SC90037 02712040
  956. ATFLNG   EQU   X'80'         Length of file                    @SC90037 02712080
  957. ATFTYP   EQU   X'40'         Type of file                      @SC90037 02712120
  958. ATFDAT   EQU   X'20'         Date of file creation             @SC90037 02712160
  959. ATFCRE   EQU   X'10'         Creator of file                   @SC90037 02712200
  960. ATFACT   EQU   X'08'         Account                           @SC90037 02712240
  961. ATFARE   EQU   X'04'         Area                              @SC90037 02712280
  962. ATFPWD   EQU   X'02'         Password                          @SC90037 02712320
  963. ATFBLK   EQU   X'01'         Blocksize                         @SC90037 02712360
  964. ATFL2    DS    X                                               @SC90037 02712400
  965. ATFACC   EQU   X'80'         Access                            @SC90037 02712440
  966. ATFENC   EQU   X'40'         Encoding                          @SC90037 02712480
  967. ATFDSP   EQU   X'20'         Disposition                       @SC90037 02712520
  968. ATFPRO   EQU   X'18'         Protection                        @SC90037 02712560
  969. ATFORG   EQU   X'04'         Origin                            @SC90037 02712600
  970. ATFFMT   EQU   X'02'         Format                            @SC90037 02712640
  971. ATFSFO   EQU   X'01'         System info                       @SC90037 02712680
  972. ATFL3    DS    X                                               @SC90037 02712720
  973. ATFXLN   EQU   X'80'         Byte count                        @SC90037 02712760
  974. *                                                                       02712800
  975. TYPFIL   DS    C'T'          Type of file (T,B,V,D),see BINF   @SC86151 02713000
  976. CLSNFL   DS    C'O'          Collision default is OVERWRITE    @SC90033 02713200
  977. TRNCFL   DC    C'T'          Truncate or Fold or Halt          @SC88120 02713500
  978. *                                                                       02714000
  979. DEFPARM  DS    AL1(KDEF+ABL,ABL,ABL,64,CR+ABL,A#,AN,A1,ABL,ABL) SC86149 02715000
  980.          DS    AL1(ABL,ABL,ABL,ABL)  Extended size defaults    @TB86196 02716000
  981. RCAPA    DS    X'0'          Capabilities of micro             @SC86149 02717000
  982. SCAPA    DS    X'8'          Capabilities I have (A-packets)   @SC86149 02718000
  983. REOL     DS    AL1(CR)       EOL char I need (cr)                       02719000
  984. SEOL     DS    AL1(CR)       EOL I'll send                              02720000
  985. RMARK    DS    AL1(SOH)      Incoming pkt start char                    02721000
  986. SMARK    DS    AL1(SOH)      Outbound pkt start char                    02722000
  987. RCTLQ    DS    AL1(A#)       Micro's ctl-quote char                     02723000
  988. SCTLQ    DS    AL1(A#)       Ctl-quote char we'll use                   02724000
  989. EBQC     DS    AL1(AAMP)     Orig 8-bit quote char                      02725000
  990. RTIMO    DS    AL1(5)        Time limit - micro to wait for us @SC86164 02726000
  991. TIMOUT   DS    AL1(0)        Timeout, if we can implement it   @SC86164 02727000
  992. TIMOSRV  DS    AL1(120)      Timeout, if we can implement it   @SC90045 02727100
  993. RPRTY    DS    AL1(0)        Recieve parity is MARK            @SC88288 02727300
  994. SPRTY    DS    AL1(DAT8)     Send parity is NONE               @SC88288 02727600
  995. BCTC     DS    AL1(1)        User requested chksum length               02728000
  996. RPTQC    DS    AL1(ATIL)     Original repeat prefix                     02729000
  997. S1XOPL   DS    A(0,S1ORDL+2) For sending prompt                @SC87274 02730000
  998. S1XON    DS    X'&S1CMD',AL1(SBA),X'5D7F',AL1(SBA),X'0005'     @SC87274 02731000
  999. S1ORDL   EQU   *-S1XON                                         @SC86295 02732000
  1000. S1EOL    DS    AL1(CR)       In case micro lost one            @SC87274 02733000
  1001. S1HND    DS    AL1(XON)      Handshake for micro               @SC87274 02734000
  1002. LDEFS    EQU   *-DEFS                                          @SC86295 02735000
  1003. *                                                                       02736000
  1004. S1DATA   DS    XL(S1ORDL)    Write or write/read orders        @SC86295 02737000
  1005. WRRD     EQU   *-1           Zap this to 0 for just write      @SC86295 02738000
  1006. *                   ... but ONLY if we really won't read again @SC87343 02739000
  1007. SVHND    DS    X             Saved value of HANDSHAKE char     @SC87343 02740000
  1008. * - - - Initialized to zeroes                                           02741000
  1009. RPTQ     DS    X             Repeat prefix                              02742000
  1010. EBQ      DS    X             8-bit quoting char (off)                   02743000
  1011. BCTU     DS    X             Checksum length in use                     02744000
  1012. BCTR     DS    X             Other Kermit's chksum length               02745000
  1013. RPADN    DS    X             Receive padding count                      02746000
  1014. SPADN    DS    X             Send pad count                    @SC86164 02747000
  1015. RPADC    DS    X             Receive pad char                           02748000
  1016. SPADC    DS    X             Send pad char                     @SC86164 02749000
  1017. TMP      DS    X                                                        02750000
  1018. TMPDW    DS    D             Work double word                           02751000
  1019. FSIZE    DS    F             Record length                     @SC86203 02752000
  1020. FRECF    DS    C             Record format flag                @SC86151 02753000
  1021. STYPE    DS    C             Type of packet sent               @SC86295 02754000
  1022. RTYPE    DS    C             Type of packet received           @SC86295 02755000
  1023. ACCTFLG  DS    X             Flag for transaction log          @SC89218 02755200
  1024. ERRLAST  DS    X             Error code on last file xferred   @SC89218 02755400
  1025. REALAST  DS    X             Reason code on last file          @SC89218 02755600
  1026. ERRNUM   DS    X             Error number                      @SC86156 02756000
  1027. REASON   DS    X             Reason for rejecting A-pkt        @SC89218 02756500
  1028. OLDERR   DS    XL2           Saved ERRNUM+REASON in loop       @SC90033 02757000
  1029. OPRND    DS    CL32          Upcased operand for table lookup  @SC87034 02759000
  1030. TCTLQ    DS    X             XECHO control character escape    @SC86165 02760000
  1031. TABTBL   DS    XL20          Tab stops                         @SC86355 02761000
  1032. TABCNT   DS    H             Current number of tabs            @SC86355 02762000
  1033.          KSYSVAR ,           Specific variables                @SC87012 02763000
  1034.          DS    0D                                              @SC86295 02764000
  1035. STODWDS  EQU   (*-STORAG)/8                                    @SC86295 02765000
  1036.          TITLE 'ERRMSG - List of error messages'               @SC86135 02766000
  1037. * Table of error messages                                      @SC86156 02767000
  1038.          MSGDF NOE,'No errors'                    Err #0       @SC86156 02768000
  1039.          MSGDF NFT,'No file transfers yet'        Err #1       @SC86156 02769000
  1040.          MSGDF TRC,'Transfer cancelled'           Err #2       @SC86156 02770000
  1041.          MSGDF USC,'Invalid server command'       Err #3       @SC86156 02771000
  1042.          MSGDF TIE,'Terminal I/O error'           Err #4       @SC86156 02772000
  1043.          MSGDF BPC,'Bad packet count or chksum'   Err #5       @SC86156 02773000
  1044.          MSGDF IPS,'Invalid packet syntax'        Err #6       @SC86158 02774000
  1045.          MSGDF IPT,'Invalid packet type'          Err #7       @SC86156 02775000
  1046.          MSGDF MIS,'Lost a packet'                Err #8       @SC86156 02776000
  1047.          MSGDF NAK,'Micro sent a NAK'             Err #9       @SC86156 02777000
  1048.          MSGDF ABO,'Micro aborted'                Err #10      @SC86156 02778000
  1049.          MSGDF FNE,'Invalid file name'            Err #11      @SC86156 02779000
  1050.          MSGDF FNF,'File not found'               Err #12      @SC86156 02780000
  1051.          MSGDF FUL,'Disk or file is full'         Err #13      @SC86345 02781000
  1052.          MSGDF DIE,'Disk I/O error'               Err #14      @SC86345 02782000
  1053.          MSGDF MOP,'Missing operand'              Err #15      @SC86158 02783000
  1054.          MSGDF SYS,'Illegal system command'       Err #16      @SC86268 02784000
  1055.          MSGDF KCE,'Kermit command error'         Err #17      @SC86171 02785000
  1056.          MSGDF TIM,'No packet received'           Err #18      @SC86355 02786000
  1057.          MSGDF RTR,'Records truncated'            Err #19      @SC87268 02787000
  1058.          MSGDF COM,'Bad communication line'       Err #20      @SC87300 02788000
  1059.          MSGDF PTY,'8th-bit quote not set'        Err #21      @SC89072 02888000
  1060.          MSGDF FTS,'File too short'               Err #22      @SC89218 02889000
  1061.          MSGDF SOH,'Missing start-of-packet'      Err #23      @SC89219 02890000
  1062.          MSGDF OPT,'Option error on filespec'     Err #24      @SC89249 02891000
  1063.          MSGDF DSP,'Unable to dispose of file'    Err #25      @SC90037 02892000
  1064.